package org.zjt.agent.generate.bytebuddy;

import net.bytebuddy.implementation.bind.annotation.SuperCall;
import net.bytebuddy.implementation.bind.annotation.This;

import java.util.List;
import java.util.concurrent.Callable;

/**
 * Description:
 *
 * @author juntao.zhang
 * Date: 2018-07-05 下午8:46
 * @see
 */
public class Target {

    public static Object log(@This Callable zuper) throws Exception {
        System.out.println("Calling database");
        try {
            return zuper.call();
        } finally {
            System.out.println("Returned from database");
        }
    }

}
